home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 1 Issue 2 / PDCD-1 - Issue 02.iso / _utilities / utilities / 001 / overfiler / !OverFiler / !Help next >
Text File  |  1994-10-15  |  13KB  |  217 lines

  1.                                    Over Filer
  2.                                    ÿÿÿÿÿÿÿÿÿÿ
  3.  
  4. 0.05 (15 Oct 1994)  David G Jones (Public Domain)
  5.  
  6. This module adds a number of features to FileCore based filer icons. These integrate the icon with the desktop object drag system better, and add a better read out of the current drive state.
  7.  
  8.     Å Allows files to be saved to icon from an application
  9.     Å Copy/move files to drive by dragging from a directory display
  10.     Å Icon can reflect state of drive, whether disc is in drive or not
  11.     Å Displays name of disc in drive
  12.  
  13. Otherwise the icon will act entirely normally.
  14.  
  15. Before OverFiler works it requires a little setting up, which should be a once only job.
  16.  
  17. *********************************************************************
  18. ************ Ensure all work is saved before carrying on ************
  19. *********************************************************************
  20.  
  21.  
  22. ÿÿ FileCore ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
  23. OverFiler will presently only work with FileCore based filing systems. The ADFS, RamFS and SCSIFS all belong to this category. If you are unsure of a systems membership then from the CLI:
  24.  
  25.     *Modules
  26.  
  27. Which will result in a huge list of modules. You should see a series of entries:
  28.  
  29.  26 038D026C 01819E44  FileCore%SCSI
  30.     038D026C 01803EA4  FileCore%ADFS
  31.     038D026C 00000000  FileCore%Base
  32.  
  33. This shows that on my machine OverFiler will work with the SCSI and ADFS systems ok. If you wish the OverFiler spell to touch on a non-FileCore based filing system, then well you have the source code...
  34.  
  35.  
  36. ÿÿ Getting Started ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
  37. If you start the application you will notice that nothing happens. OverFiler needs to be informed of your systems setup before it can work its charms.
  38.  
  39. Why can't this be done automatically? Well it can be, but this is more flexible approach and should only be a one off excercise.
  40.  
  41. You have to inform OverFiler of each drive which you wish it to take over and which filing system it belongs to. Also you will have to inform it of the corresponding filer icon on the icon bar. There are two ways of finding out the icon number.
  42.  
  43. Å Use an application which reports on the current pointer context. There are thousands of these about, they make a useful first application. They usually tell you the icon number under the pointer, so collect the icon numbers for all the drives which you wish to inform OverFiler of. I can whole heartedly recommend Gambara if you are looking for such an application.
  44.  
  45. Å Secondly, guess it. Basically the Switcher icon is given the icon number 0. Then ADFS :0 gets icon 1, followed by any other ADFS drives. Thereafter the system will move onto the other filing systems, with the icon number increasing with each drive. Well I think so.
  46.  
  47. However you come across the icon number you should find they are consistent between Desktop startups, so the icon hunt should only need to be done once. If you incorrectly calculate an icon number then you might find unexpected icon bar icons disappearing, or the newly created icon will not respond to mouse clicks. If everything goes wrong then you might just have to reboot the Desktop.
  48.  
  49. Adding a drive is accomplished by:
  50.  
  51.     *OverFiler_Add <drive> <fsname> <icon> .....
  52.  
  53. The drive is a number from 0 - 7. Anything below 4 is considered a floppy drive, the rest hard drives. The FS name is "ADFS", "SCSI", "Ram" etc. The icon number you should have.
  54.  
  55. On my system if I use:
  56.  
  57.     *OverFiler_Add 0 ADFS 1
  58.  
  59. The ADFS :0 drive splutters into action. If there is a disc in the drive the n the icon name is replaced with the disc's name. The icon sprite can also reflect the drive state. Otherwise the icon should react normally to mouse clicks, help messages, etc.
  60.  
  61. So the idea is that you use a series of OverFiler_Add commands for each drive you wish to be taken over. This is basically it though there are some refinements to the OverFiler_Add command which make life more interesting. Once you have this worked out then the commands can be put in your !Boot file or will be adopted in the next generated desktop boot file.
  62.  
  63.  
  64. ÿÿ OverFiler_Add ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
  65. As previously outlined this CLI command will allow OverFiler to take control over a FileCore filer icon.
  66.  
  67. Syntax: *OverFiler_Add <drive> <FSname> <iconnumber> [-Directory] [-Poll] [-priority <priority>] [-sprite <name>] [-Click]
  68.  
  69. Required arguments:
  70. driveîîîîîîÅ The number of the drive 0 - 7.
  71. FSnameîîîîîÅ Filing system name. Examples "ADFS", "SCSI", "Ram". Case sensitive.
  72. iconnumberîÅ Associated filer icon number on icon bar.
  73.  
  74. Additions arguments:
  75. priorityîîîÅ The order for placement of icons on the icon bar is controlled by a priority value. OverFiler will naturally set this to either ADFS floppy/hard discs depending on the drive number. You may give a specific value though. The standard system priorities are: (PRM 3:98)
  76.     ADFS hard discs       &70000000
  77.     ADFS floppy discs     &60000000
  78.     'App' icon            &50000000
  79.     RAM disc              &40000000
  80.     Ethernet              &30000000
  81.     Econet                &20000000
  82.     Other filing systems  &10000000
  83.     Printer drivers       &0F000000
  84.     TinyDir               &0E000000
  85.  
  86. spriteîîîîîÅ There are three possibilities here.
  87. Å If you supply a valid sprite name then the icon will always take that appearance.
  88. Å If you do not include the -sprite option then we can have some fun. The name of the sprite is built up from
  89.     <FSname><drive>i|o
  90. The tail i or o characters allow different sprites for when a disc is in a drive or the drive is empty. Both sprites should be defined in the same mode and have the same dimensions.
  91. Supplied should be the two sprites 'adfs0o' and 'adfs0i'. The out format was taken, I think, from a complete set of icons by Ian Waugh, the in version a bodged attempt by myself to match it.
  92. Å If there is an error in any of the above two ways then the system will default to showing 'floppydisc' and 'harddisc' icons depending on the drive type. These are built into RiscOS so should always be available.
  93.  
  94. All sprites have to be within the Wimp Sprite pool. Use *IconSprites <filename> to load a sprite file into this memory.
  95.  
  96. Additional switches:
  97. pollîîîîîîîÅ This is quite a nice option for floppy based systems. Every second OverFiler will test the state of the drive. If a disc is inserted or removed then the icon will change to reflect this. The sprite might change and the text will display the disc's name. Note that there might be a slight pause when a disc is inserted while the system reads in the discs details.
  98. There is one slight inconvenience with this. If a drive is setup to -poll but initially the drive is empty then you may hear pulsing sounds every second until a disc has been inserted. Thereafter there is no indication that the drive is being tested, even when it is empty. If some one knows a way around this then please tell.
  99. The poll system relies on a drive being able to inform RiscOS whether it is empty or not. My old A310 does this ok, but as for later models I don't know. The little TestEmpty BASIC utility within the !OverFiler directory will attempt to check if a certain drive supports Empty detection or not.
  100.  
  101. clickîîîîîîÅ This is used for 'floppy' style drives that can not report whether the drive is empty or not. See the end of the -Poll entry above. Whenever you click on the icon the disk in the drive is examined and the icon is updated to reflect the current state.
  102.  
  103. directoryîîÅ When the drive is first added a directory display will be opened on the drives contents. If the -poll switch is on then each time a new disc is inserted the appropriate directory display will be opened which can be quite useful.
  104.  
  105.  
  106. ÿÿ OverFiler_Remove ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
  107. This CLI command will inform OverFiler to ignore a specific drive. As a result its icon will be deleted from the icon bar. In its place the original icon associated with the filer should be re-created.
  108.  
  109. Syntax: *OverFiler_Remove <drive> <FSname>
  110.  
  111. Required arguments:
  112. driveîîîîîîÅ The number of the drive 0 - 7.
  113. FSnameîîîîîÅ Filing system name. Examples "ADFS", "SCSI", "Ram". Case sensitive.
  114.  
  115. The drive and FSname should be the exactly the same as those used during the associated OverFiler_Add command.
  116.  
  117. You will be informed if no matching drive could be found.
  118.  
  119. If you have set up more than one drive with the same drive/FSname combination then the most recently added entry will be removed.
  120.  
  121.  
  122. ÿÿ OverFiler_Drives ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
  123. This CLI command will list all the drives which OverFiler currently knows about. Useful really to keep a track on what is happening, or if you or having problems removing an entry.
  124.  
  125. Syntax: *OverFiler_Drives
  126.  
  127. An example of its result is:
  128.  D FS   Icon    ......MECFRASHPD
  129. --------------------------------
  130. +0 Ram  7 7     0000001000001000
  131. -1 ADFS 1 6     0000001010001001
  132.  0 ADFS 1 1     0000001000000010
  133.  4 SCSI 2 2     0000001000001100
  134.  
  135. The components of each entry:
  136. Å First character displays any executive actions. + means it is waiting to be added. - waiting to be removed. This delay is introduced as we have to move from a CLI instigated command back to the desktop to modify icons, etc.
  137. Å Drive number
  138. Å Filing system name
  139. Å Icon number as supplied in OverFiler_Add. Same as original filer owner.
  140. Å Current icon number as privately used.
  141. Å Block of associated flags. They correspond to current values for:
  142.     Directory     Reflect -Directory switch
  143.     Poll          Reflect -Poll switch
  144.     Harddisc      If OverFiler feels drive is a Harddisc
  145.     Sprite        Could not find sprite so reverting to default values
  146.     Adding        Waiting to add drive from WIMP
  147.     Removing      Waiting to remove drive from WIMP
  148.     Full process
  149.     Corrupt disc  Disc in drive is corrupt
  150.     Empty drive   Drive is currently empty
  151.     same Mode
  152.     final Remove  Original icon has been recreated, now forget about drive
  153.     Priority      Reflect -Priority arguments inclusion
  154.     spr Overload  Reflect -Sprite arguments inclusion
  155.     Click         Reflect -Click switch
  156.  
  157.  
  158. ÿÿ Object dragging ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
  159. OverFiler icons are also better integrated within the object dragging facilities of the desktop.
  160.  
  161. If you drag an icon from a 'Save as' dialogue box to an OverFiler icon then the file will be saved in the root directory of that drive.
  162.  
  163. If you drag a file or a number of files from a directory viewer to an OverFiler icon then the files will be copied to the root directory of that drive. If the Shift key is pressed then the files will be moved. The options for the relevant action are taken from the current set defined within the Filer.Options menu.
  164.  
  165.  
  166. ÿÿ My set up ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
  167. Ok probably not much use to you but it shows a range of the abilities:
  168.  
  169. *overfiler_add 0 ADFS 1 -poll -directory
  170. *overfiler_add 4 SCSI 2
  171. *overfiler_add 0 Ram  7 -sprite ramfs -priority &40000000
  172.  
  173.  
  174. ÿÿ Releases ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
  175. Ancestors: ADFSicon & DiskLight
  176. 0.01 (30 Sep 1994)  First release into the big world
  177. 0.02 (02 Oct 1994)  Analyses mode change to see if icon update is needed
  178.                     Will not open directory on mode change if -directory...
  179. 0.03 (08 Oct 1994)  Added !OverFiler application sprite
  180.                     Checks to see if original Filer task closes down
  181.                     OverFiler_Remove will recreate original filer icon
  182.                     Compatibility with Desktop save protocol
  183. 0.04 (09 Oct 1994)  Added -Click for floppy drives with no Empty detection
  184.                     Attempt to recreate icons on Quit'ng
  185.                     Will detect illegal icons supplied in OverFiler_Add
  186.                     Suitable for placing in ROM...
  187.                     Added simple TestEmpty utility in application directory
  188. 0.05 (15 Oct 1994)  Improved -Click support                  
  189.  
  190. The customary set of ideas for future outlandish additions:
  191. Å Improve detection of empty drive. Currently Wimp_PollIdle with fs_MiscOp Poll. Is it possible?
  192. Å Work with non-FileCore filing systems.
  193. Å Detect if disc changes name, then automatically update icon text.
  194. Å Fade icon if it has been claimed by other wimp task, ie during format.
  195. Å Detect if a filer is restarted with new Task handle, etc...
  196.  
  197.  
  198. ÿÿ Thanks to ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
  199. My thanks to the authors of the following programs used during the creation of OverFiler.
  200.  
  201.     StrongEd         Guttorm Vik
  202.     WimpMon          Tom Hughes
  203.     SparkFS          David Pilling
  204.  
  205.  
  206. ÿÿ Public Domain ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
  207. This software is in the Public Domain so you may do whatever you like with it. The source code should be included so if you feel the urge to change anything then off you go. If you do make a change which might be useful to others then why not send a copy to me and I will include it in the next release.
  208.  
  209.  
  210. If you have any comments, suggestions then please get in contact. Please include the version number of the application. If you wish to get the latest version of this or another other pieces of my work then send a 800k disc and I will return it in the following post.
  211.  
  212.     David G Jones
  213.     160 Hazelwood Drive
  214.     ST. ALBANS
  215.     Herts  AL4 0UZ
  216.     0727 - 852 548
  217.     David.GJones@launchpad.unc.edu